package kr.hkit.androidcomplete01.chapter07;

import android.app.*;
import android.content.*;
import android.graphics.*;
import android.os.*;
import android.view.*;

public class CustomView extends Activity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyView vw = new MyView(this);
		setContentView(vw);
	}

	class MyView extends View {
		Paint paint;
		public MyView(Context context) {
			super(context);
			paint = new Paint();
		}

		public void onDraw(Canvas canvas) {
			super.onDraw(canvas);
			canvas.drawColor(Color.WHITE);
			paint.setColor(Color.BLUE);		
			canvas.drawCircle(100, 100, 80, paint);
			
			paint.setColor(Color.RED);
			canvas.drawCircle(300, 100, 80, paint);

			
		}
		
/*		public void onDraw2(Canvas canvas) {
			canvas.drawColor(Color.LTGRAY);
			Paint Pnt = new Paint();
			Pnt.setColor(Color.RED);
			canvas.drawCircle(50,50,80,Pnt);
			
		}*/
	}
}
